/*
 * Created on 2005-8-11
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.linkage.lcims.base.service.system.impl;

import com.linkage.lcims.base.dao.system.interfaces.ColumnSequenceDAO;
import com.linkage.lcims.base.po.system.MdColumnSequence;
import com.linkage.lcims.base.service.system.interfaces.ColumnSequenceBO;
import com.linkage.util.exception.ServiceException;

/**
 * @author Lancelot
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class ColumnSequenceBOImpl implements ColumnSequenceBO {
	
	private ColumnSequenceDAO columnSequenceDAO;
	
	/**
	 * 
	 */
	public ColumnSequenceBOImpl() {
		// TODO Auto-generated constructor stub
		
	}

	/* (non-Javadoc)
	 * @see com.linkage.lcims.base.service.system.interfaces.ColumnSequenceBO#getSequence(com.linkage.lcims.base.po.system.MdColumnde)
	 */
	public Integer getSequence(MdColumnSequence columnSequence)
			throws ServiceException {
		// TODO Auto-generated method stub
		try {
			return columnSequenceDAO.getSequence(columnSequence.getComp_id().getTablename(),
				columnSequence.getComp_id().getColumnname());
		}catch (Exception e) {
			throw new ServiceException(e,this.getClass());
		}
	}

	/**
	 * @return Returns the columnSequenceDAO.
	 */
	public ColumnSequenceDAO getColumnSequenceDAO() {
		return columnSequenceDAO;
	}
	/**
	 * @param columnSequenceDAO The columnSequenceDAO to set.
	 */
	public void setColumnSequenceDAO(ColumnSequenceDAO columnSequenceDAO) {
		this.columnSequenceDAO = columnSequenceDAO;
	}
}
